import Vue from 'vue'
import Router from 'vue-router'
import Layout from '../view/layout/Index'
import Login from '../view/login/Login3'  // 导入组件
import Employee from '../view/basic/Employee';
import Data from '../view/basic/Data';
import Product from '../view/basic/Product';
import User from '../view/basic/User';
import material from '../view/hr/material'
import commodity from '../view/hr/commodity'

import DataTest from '../view/0.ex/1.data'
import Diractive from '../view/0.ex/2.diractive'
import First1 from '../view/new/First1'
import First2 from '../view/new/First2'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },

    {
      path: '/layout',
      name: 'Layout',
      component: Layout,
      children: [
        {
          path: 'employee',
          name: 'Employee',
          component: Employee
        }, {
          path: 'data',
          name: 'Data',
          component: Data
        }
        , {
          path: 'User',
          name: 'User',
          component: User
        }
        , {
          path: 'Product',
          name: 'Product',
          component: Product
        }
        ,
        {
          path:'material',
          name:'material',
          component:material
        },
        {
          path:'commodity',
          name:'commodity',
          component:commodity
        }
        , {
          path: 'DataTest',
          name: 'DataTest',
          component: DataTest
        }
        , {
          path: '/directive',
          name: 'D',
          component: Diractive
        },{
          path:"/First1",
          name:'First1',
          component:First1
        },{
          path:"/First2",
          name:'First2',
          component:First2
        }
      ]
    }
  ]
})
